//
//  Fraction.h
//  Home-2 - 完成分数练习
//
//  Created by 岁变 on 16/7/5.
//  Copyright © 2016年 岁变. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface Fraction : NSObject

@property (nonatomic, assign) NSInteger denominator;  //分母

@property (nonatomic, assign) NSInteger numerator; //分子


- (instancetype)initWithNumerator:(NSInteger)numerator denominator:(NSInteger)denominator;

+ (instancetype)FractionWithNumerator:(NSInteger)numerator denominator:(NSInteger)denominator;

//加
- (Fraction *)addWithFraction:(Fraction *)fra;

//减
- (Fraction *)deWithFraction:(Fraction *)fra;

//乘
- (Fraction *)mulWithFraction:(Fraction *)fra;

//除
- (Fraction *)divWithFraction:(Fraction *)fra;

//比较
- (void)compareWithFraction:(Fraction *)fra;


@end
